Skip to content

feat!: align flag names with lean-quickstart spec#321

Open
conache wants to merge 7 commits intolambdaclass:mainfrom
conache:add-spec-compliant-flag-names
Open

feat!: align flag names with lean-quickstart spec#321
conache wants to merge 7 commits intolambdaclass:mainfrom
conache:add-spec-compliant-flag-names

Conversation

@conache
Copy link
Copy Markdown

@conache conache commented Apr 28, 2026

Summary

Closes #287. Aligns CLI flags with the lean-quickstart spec.

Removed:

  • --custom-network-config-dir

Added:

Flag Maps to
--genesis config.yaml
--validators annotated_validators.yaml
--bootnodes nodes.yaml
--validator-config validator-config.yaml
--hash-sig-keys-dir hash-sig-keys/

--genesis, --validators, and --bootnodes are mandated by the spec.
--validator-config and --hash-sig-keys-dir cover ethlambda-internal paths that the spec doesn't standardize.

Coordination

Coordinated lean-quickstart PR: #321.

Testing

To verify the new flags locally:

  1. Build the binary from this branch:

    cargo build --release
  2. Inspect --help and confirm the new flags appear:

./target/release/ethlambda --help
  • Flags that should be listed as part of the change: --genesis, --validators, --bootnodes, --validator-config, and --hash-sig-keys-dir
  • --custom-network-config-dir should no longer be present

To boot the binary from the lean-quickstart repository:

  1. Checkout the ethlambda-update-cmd-flags branch associated with the lean-quickstart PR.
  2. Run NETWORK_DIR=local-devnet ./spin-node.sh --node ethlambda_0 --generateGenesis

The binary parses succesfully parses all five flags.

Important note:

Unrelated to this PR; worth flagging as a separate issue if not already tracked.

Local-devnet boot panics after parsing the CLI flags with the following error (confirmed it reproduces identically on main):

thread 'main' (13480983) panicked at bin/ethlambda/src/main.rs:136:47:
Failed to parse config.yaml: Error("GENESIS_VALIDATORS[0]: invalid type: string \"...", expected struct GenesisValidatorEntry", line: 12, column: 7)

@conache conache marked this pull request as ready for review April 29, 2026 13:06
@conache conache marked this pull request as draft April 29, 2026 13:07
@conache conache marked this pull request as ready for review April 29, 2026 13:07
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR replaces the single --custom-network-config-dir flag with five explicit path flags (--genesis, --validators, --bootnodes, --validator-config, --hash-sig-keys-dir) to align with the lean-quickstart spec. All changed documentation and the devnet reference guide are updated consistently.

  • P1 — preview-config.nix was not updated: line 93 still passes --custom-network-config-dir genesisDir; the new binary will reject this unknown flag and all four Nix-managed node services will fail to start.

Confidence Score: 3/5

Not safe to merge until preview-config.nix is updated — all Nix node services will fail to start with the new binary.

One P1 defect: preview-config.nix still references the removed --custom-network-config-dir flag, which will cause immediate startup failure for Nix-managed nodes. All other changed files are correct. P1 caps the score at 4, and the affected path is a concrete production entrypoint, pulling the score to 3.

preview-config.nix — needs the five new flags in place of --custom-network-config-dir

Important Files Changed

Filename Overview
bin/ethlambda/src/main.rs Replaces single --custom-network-config-dir flag with five explicit path flags; mapping logic and error handling are correct and consistent with previous behavior.
.claude/skills/devnet-runner/references/long-lived-devnet.md All five docker run invocations (initial start + rolling-restart template) updated to the new flags consistently.
docs/checkpoint_sync.md Example command updated correctly to use the five new flags; prose updated to remove the old flag reference.
docs/fork_choice_visualization.md Example cargo run command updated correctly to use the five new flags.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    CLI["CLI Argument Parsing\n(clap::Parser)"]
    CLI -->|"--genesis"| GP["options.genesis\n→ config_path\n(GenesisConfig)"]
    CLI -->|"--validators"| VP["options.validators\n→ validators_path\n(annotated_validators.yaml)"]
    CLI -->|"--bootnodes"| BP["options.bootnodes\n→ bootnodes_path\n(nodes.yaml)"]
    CLI -->|"--validator-config"| VC["options.validator_config\n→ validator_config\n(validator-config.yaml)"]
    CLI -->|"--hash-sig-keys-dir"| KD["options.hash_sig_keys_dir\n→ validator_keys_dir\n(hash-sig-keys/)"]
    GP --> GC["parse GenesisConfig\n(serde_yaml_ng)"]
    BP --> RB["read_bootnodes()"]
    VC --> PR["populate_name_registry()"]
    VP --> RV["read_validator_keys()"]
    KD --> RV
    GC --> FS["fetch_initial_state()"]
    RB --> SW["build_swarm()"]
    RV --> BC["BlockChain::spawn()"]
    FS --> BC
Loading

Comments Outside Diff (1)

  1. preview-config.nix, line 93 (link)

    P1 Stale flag reference will break Nix node service

    preview-config.nix still passes --custom-network-config-dir genesisDir to the binary. The new binary no longer recognizes this flag; clap will exit with an "unexpected argument" error, preventing all four Nix-managed node services from starting. The five replacement flags (--genesis, --validators, --bootnodes, --validator-config, --hash-sig-keys-dir) each expect a full file/directory path derived from genesisDir.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: preview-config.nix
    Line: 93
    
    Comment:
    **Stale flag reference will break Nix node service**
    
    `preview-config.nix` still passes `--custom-network-config-dir genesisDir` to the binary. The new binary no longer recognizes this flag; clap will exit with an "unexpected argument" error, preventing all four Nix-managed node services from starting. The five replacement flags (`--genesis`, `--validators`, `--bootnodes`, `--validator-config`, `--hash-sig-keys-dir`) each expect a full file/directory path derived from `genesisDir`.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: preview-config.nix
Line: 93

Comment:
**Stale flag reference will break Nix node service**

`preview-config.nix` still passes `--custom-network-config-dir genesisDir` to the binary. The new binary no longer recognizes this flag; clap will exit with an "unexpected argument" error, preventing all four Nix-managed node services from starting. The five replacement flags (`--genesis`, `--validators`, `--bootnodes`, `--validator-config`, `--hash-sig-keys-dir`) each expect a full file/directory path derived from `genesisDir`.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Merge branch 'main' into add-spec-compli..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sync flag names with lean-quickstart

1 participant